<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			td{
				height: 25px;
				width: 100px;
				border: #3a8ee6 1px solid;

			}
			input{
				height: 21px;
			}
		</style>
		<script type="text/javascript" src="../../js/jquery-1.11.0.min.js"></script>
		<script type="text/javascript" src="../../js/jquery-3.3.1.js"></script>
		<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
		<script type="text/javascript" src="../../js/01/daoru/drugd/fandAll.js"></script>
		<script type="text/javascript" src="../../js/01/daoru/drugd/feny.js"></script>
		<script type="text/javascript">
			$(function () {
				gets(1)
			})

			//全选/全不选操作
			function setAllNo(){
				var box = document.getElementById("aaa");
				var choose = document.getElementsByName("choose");
				if(box.checked == false){
					for (var i = 0; i < choose.length; i++) {
						choose[i].checked = false;
					}
				}else{
					for (var i = 0; i < choose.length; i++) {
						choose[i].checked = true;
					}
				}
			}

			function update1() {
				var an=[]
				var shenhe1=[]
				var yijian1=[]
				var shenhe=$("select[name='shenhe']");
				for ( shenheKey in shenhe) {

				}
				var yijian=$("input[name='yijian']");
				for ( yijianKey in yijian) {

				}

				var box = document.getElementsByClassName("selectItem1");
				for ( boxKey in box) {
					if (box[boxKey].checked){
						shenhe1.push(shenhe[boxKey].value)
						yijian1.push(yijian[boxKey].value)
						an.push(box[boxKey].value)
					}
				}
				console.log(shenhe)
				console.log(yijian1)
				$.ajax({
					url: '/myspringboot/DrugInformationController/updateSubmit',
					type: 'POST',
					traditional: true,
					async:false,
					dataType: "json",
					data:{
						poAuditResult:shenhe1,
						poId:an,
						poAuditOpinion:yijian1,
					},
					success:function (result) {
						alert(result.msg)
						window.location.href="drug03.html"
					}
				})

			}
		</script>
	</head>
	<body>
	<div>
		<form id="update">
		<table class="" style="border: 1px solid #999;border-collapse:collapse">
			<tr>
				<h3 style="height: 50px" >采购单审核</h3>


			</tr>
			<tr>
				<td>采购单编号：</td>
				<td><input type="text" id="poNumber" value=""></td>
				<td></td>
				<td>采购单名称：</td>
				<td><input type="text" id="poName" value=""></td>
				<td></td>
			</tr>
			<tr>
				<td>采购单状态：</td>
				<td>
					<select id="poState" style=" height: 25px; width: 173px;">
						<option value="">全部</option>
						<option value="0">审核中</option>
						<option value="1">审核通过</option>
						<option value="2">审核未通过</option>
					</select>
				</td>
				<td></td>
				<td>采购时间：</td>
				<!--    -->
				<td><input id="lefTime" style="width: 74px" type="date" value="">--<input id="rightTime" style="width: 74px" type="date" value=""></td>
				<td></td>
			</tr>
			<tr>
				<td>医院名称：</td>
				<td><input id="hName" type="text" value=""></td>
				<td></td>
				<td></td>
				<td></td>
				<td></td>
			</tr>
		</table>

		<td>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<button type="reset"  onclick="gets()">查询</button>
		</td>
		<br>
		<td>
			<a onclick="update1()"><button>提交审核结果</button></a>
		</td>
	</div>
	<iframe id="iframe" name="rfFrame" src="about:blank" style="display:none;"></iframe>
	<div>
		<table ><!--class="a"-->
			<tr>
				<td>序号</td>
				<td><input type="checkbox" id="aaa" onclick="setAllNo()">选择</td>
				<td>审核结果</td>
				<td>审核意见</td>
				<td>医院名称</td>
				<td>采购单编号</td>
				<td>采购单名称</td>
				<td>开始时间</td>
				<td>结束时间</td>
				<td>建单时间</td>
				<td>提交时间</td>
				<td>审核时间</td>
				<td>采购单状态</td>
				<td>查看</td>
			</tr>
			<tbody class="a"></tbody>
		</table>
	</div>
	<div class="im-page" id="impage">
		<tr>
			<td><button id='first'>首页</button></td>
			<td><button id='before'>上一页</button></td>
			<td>第<span id="pnum"></span>页</td>
			<td>共<span id="ptotal"></span>页</td>
			<td><button  id='next'>下一页</button></td>
			<td><button id='last'>尾页</button></td>
		</tr>
	</div>
	</form>

	<!--查看药品信息模态框  模态框（Modal） -->
	<div class="modal fade" id="Check" tabindex="-1" role="dialog" aria-labelledby="Check1" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">
					</button>
					<h4 class="modal-title" id="Check1">
						查看药品品目
					</h4>
				</div>
				<div class="modal-body">
					<form id="">
						<table>
							<!-- 用来存放修改的主键 -->
							<!--<input type="hidden" id="diId">-->
							<tr>
								编辑药品信息
							</tr>
							<tr>
								<!-- <input name="diId" id="diId1" type="hidden">
                                 <input name="daId" id="daId1" type="hidden">-->
								<td>流水号：</td>
								<td><input type="text" name="diNumer" value="" id="diNumer" readonly="readonly"></td>
							</tr>
							<tr>
								<td>通用名：</td>
								<td><input type="text" value="" name="diName" id="diName" readonly="readonly"></td>
								<td>剂型：</td>
								<td><input type="text" value="" name="diForm" id="diForm" readonly="readonly"></td>
							</tr>
							<tr>
								<td>规格：</td>
								<td><input type="text" value="" name="diSpecifications" id="diSpecifications" readonly="readonly"></td>
								<td>单位：</td>
								<td><input type="text" value="" name="diUnit" id="diUnit" readonly="readonly"></td>
							</tr>
							<tr>
								<td>转换系数：</td>
								<td><input type="text" value="" name="diCc" id="diCc" readonly="readonly"></td>
								<td>生产企业名称:</td>
								<td>
									<input style=" height: 25px; width: 160px;" name="mfName" id="mfName" class="d" readonly="readonly">
									</input>
								</td>
							</tr>
							<tr>
								<td>商品名：</td>
								<td><input type="text" value="" name="daName" id="daName" readonly="readonly"></td>
								<td>中标价格:</td>
								<td><input type="text" value="" name="diBiddingPrice" id="diBiddingPrice" readonly="readonly"></td>
							</tr>
							<tr>
								<td>批注文号：</td>
								<td><input type="text" value="" name="diApprovalNumber" id="diApprovalNumber" readonly="readonly"></td>
								<td>批准文号有效期:</td>
								<td><input type="text" value="" name="diApprovalTerm" id="diApprovalTerm" readonly="readonly"></td>
							</tr>
							<tr>
								<td>是否进口药：</td>
								<td>
									<label><input name="diImportDrugs"  type="radio" value="0" id="inspection2" class="diImportDrugs" readonly="readonly">是</label>
									<label><input name="diImportDrugs"  type="radio" value="1" id="inspection3" class="diImportDrugs" readonly="readonly">否</label>
								</td>
								<td>包装材质:</td>
								<td><input type="text" value="" name="diMaterialQuality" id="diMaterialQuality" readonly="readonly"></td>
							</tr>
							<tr>
								<td>包装单位：</td>
								<td><input type="text" value="" name="diBunit" id="diBunit" readonly="readonly"></td>
								<td>最新零售价:</td>
								<td><input type="text" value="" name="diNewPrice" id="diNewPrice" readonly="readonly"></td>
							</tr>
							<tr>
								<td>零售价出处：</td>
								<td><input type="text" value="" name="diRetailPrice" id="diRetailPrice" readonly="readonly"></td>
								<td>质量层次:</td>
								<td>
									<input style=" height: 25px; width: 160px;" class="c" name="diDqlName" id="diDqlName" readonly="readonly">
									</input>
								</td>
							</tr>
							<tr>
								<td>质量层次说明：</td>
								<td><input type="text" value="" name="diDqlexplain" id="diDqlexplain" readonly="readonly"></td>
								<td>有无药品检验报告:</td>
								<td>
									<label><input name="diInspectionReport" type="radio" value="0" id="inspection" class="diInspectionReport" readonly="readonly">有</label>
									<label><input name="diInspectionReport" type="radio" value="1" id="inspection1" class="diInspectionReport" readonly="readonly">无</label>
								</td>
							</tr>
							<tr>
								<td>药品检验报告编号：</td>
								<td><input type="text" value="" name="diInspectionNumber" id="diInspectionNumber" readonly="readonly"></td>
								<td>药品检验报告有效期:</td>
								<td><input type="text" value="" name="diInspectionTerm" id="diInspectionTerm" readonly="readonly" ></td>
							</tr>
							<tr>
								<td>产品说明:</td>
								<td colspan="4"><textarea rows="3" cols="60" type="radio" value="" name="diDescription" id="diDescription" readonly="readonly"></textarea></td>
							</tr>
							<tr>
								<td>药品交易状态:</td>
								<td>
									<input style=" height: 25px; width: 160px;" name="diTradingStatus" id="diTradingStatus" readonly="readonly">
									</input>
								</td>
							</tr>
						</table>
					</form>
					<td>
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
						<button type="button" data-dismiss="modal" class="btn btn-primary">关闭</button>
					</td>
				</div>
				<div class="modal-footer">
				</div>
			</div><!-- /.modal-content -->
		</div><!-- /.modal-dialog -->
	</div><!-- /.modal -->
	</body>
</html>
